From: Joey Hess Date: Thu, 30 Jan 2025 21:43:38 +0000 (-0400) Subject: Revert "try truncateFilePath on windows again" X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~6^2~176 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=8678588e6a0b3daa3136ff26bcfb2da309731429;p=git-annex.git Revert "try truncateFilePath on windows again" This reverts commit 0d4abbcb92ff40e90cbc44f3d1a42243bdbae2ba. Test suite was failing again with that. --- diff --git a/Annex/ReplaceFile.hs b/Annex/ReplaceFile.hs index 5cb46b17dd..3af555d39d 100644 --- a/Annex/ReplaceFile.hs +++ b/Annex/ReplaceFile.hs @@ -5,6 +5,8 @@ - Licensed under the GNU AGPL version 3 or higher. -} +{-# LANGUAGE CPP #-} + module Annex.ReplaceFile ( replaceGitAnnexDirFile, replaceGitDirFile, @@ -57,7 +59,11 @@ replaceFile createdirectory file action = replaceFile' createdirectory file (con replaceFile' :: (RawFilePath -> Annex ()) -> RawFilePath -> (a -> Bool) -> (RawFilePath -> Annex a) -> Annex a replaceFile' createdirectory file checkres action = withOtherTmp $ \othertmpdir -> do +#ifndef mingw32_HOST_OS let basetmp = relatedTemplate' (P.takeFileName file) +#else + let basetmp = toRawFilePath "t" +#endif withTmpDirIn (fromRawFilePath othertmpdir) (toOsPath basetmp) $ \tmpdir -> do let tmpfile = toRawFilePath tmpdir P. basetmp r <- action tmpfile